<!DOCTYPE html>
<html lang="en" ng-app="app">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="js/1.4.8/angular.js"></script>
</head>
<body>
<div ng-controller="myCtrl">
   <div>
       <input id="txt1" type="text" ng-model="locationPath">
   </div>
    <div>{{locationPath}}</div>
</div>
<script type="text/javascript">
    var app = angular.module("app", [])
            .controller("myCtrl",["$scope","$location",function ($scope,$location) {
                $scope.$watch('locationPath',function (path) {
                    $location.path(path);
                });
                $scope.$watch('$location.path()',function (path) {
                    $scope.locationPath = path;
                });
            }]);
</script>
</body>
</html>